auto merge of #842 : alexcrichton/cargo/issue-838, r=brson
authorbors <bors@rust-lang.org>
Thu, 13 Nov 2014 19:23:05 +0000 (19:23 +0000)
committerbors <bors@rust-lang.org>
Thu, 13 Nov 2014 19:23:05 +0000 (19:23 +0000)
commit788dadb256126dc40682b6346f7f20aa38f4ab35
tree8993f69af495b32ca1087cc278b1399739ca9703
parent3c926c32cad8932de37249b6353962a6f8f310df
parent673c30de64bf118af7aa51aab219ba7fc9cdc26e
auto merge of #842 : alexcrichton/cargo/issue-838, r=brson

A package can be required to be built for both the host and target architectures
in some cases. For example a crate could be a normal dependency and a build
dependency. Cargo specially handles this case with respect to the build script
to ensure that the build script is run once per output platform.

Cargo also has logic, however, to run the build script only once when the target
and host platforms are the same. In this case Cargo previously wasn't filling in
the local build script output cache for both the host and target platforms, just
the target platform. This commit remedies this situation by ensuring that cargo
populates both the host and target locations in the cache.

Closes #838
src/cargo/ops/cargo_rustc/mod.rs
tests/test_cargo_compile_custom_build.rs